package com.example.seakdreamandroid;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;

public class WebViewActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_web_view);

        Intent intent = new Intent();
        intent = getIntent();
        String uri = intent.getStringExtra("uri");

        android.webkit.WebView webView = findViewById(R.id.webView);

        switch (uri) {
            case "https://link.jscdn.cn/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBc2VhMTRSWGRjSDFndzFlYkR3VUdZbHFjODUzP2U9djlZdGRm.jpg":
                webView.loadUrl("https://zhuanlan.zhihu.com/p/30367883");
                break;
            case "https://link.jscdn.cn/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBc2VhMTRSWGRjSDFnd3Y0bk9oTUhTeXB2TlNNP2U9OWtSb3RF.jpg":
                webView.loadUrl("https://zhuanlan.zhihu.com/p/42610942");
                break;
        }
    }
}